<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:body>
        <table width="100%" border="0">
            <tr>
                <td align="left">
                    <h:outputText value="Movie" style="font-size: 28px; color: #5f2073; font-weight: bold"/> 
                </td>
                <td align="right">
                    <h:form rendered="#{mbLogin.loged}">
                        <h:outputText value="Logged user: "/>
                        <p:commandLink style="color: black" ajax="false" immediate="true" value="#{mbLogin.logedUser.transFullName}" action="#{mbUser.navigationToUpdateUser(mbLogin.logedUser)}"/> 
                        <p:commandButton value="logout" actionListener="#{mbLogin.logout}"/>
                    </h:form>
                    <h:form rendered="#{!mbLogin.loged}">
                            <h:outputText value="Username:"/>
                            <p:inputText value="#{mbFilm.mbLogin.userName}"/>
                            <h:outputText value="Password:"/>
                            <p:inputText type="password" value="#{mbLogin.password}"/>
                        <p:commandButton value="login" ajax="false" action="#{mbLogin.login}"/>
                        <p:commandButton value="register" ajax="false" action="#{mbUser.navigationToUpdateUser(null)}"/> 
                    </h:form>
                </td>
            </tr>
        </table>
    </h:body>
</html>
